﻿
using System.Xml;

public class ResponseFormatter : XmlTextReader
{
    public ResponseFormatter(System.IO.TextReader reader) : base(reader) { }
    
  
    public ResponseFormatter()
    {
        NameTable.Add("xsi:type");
    }
    
    
    
    public override bool ReadAttributeValue()
    {
       
        return base.ReadAttributeValue();
    }

  
    //public override string GetAttribute(string name)
    //{
    //    System.Diagnostics.Debug.WriteLine(name);
    //    NameTable.Add ("xsi:type");


    //    if (name == "xsi:type")
    //        return string.Empty;
    //    else
    //        return base.GetAttribute(name);
    //}


    public override string NamespaceURI
    {
        get { return ""; }
    }
}

// helper class to omit XML decl at start of document when serializing
public class XTWFND : XmlTextWriter
{
    public XTWFND(System.IO.TextWriter w) : base(w) { Formatting = System.Xml.Formatting.Indented; }
    public override void WriteStartDocument() { }
}
